﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Calendar.aspx.cs" Inherits="DentScan2.WebApp.Calendar" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>Календар</h1>
    <asp:UpdatePanel ID="upCalendar" runat="server">
        <ContentTemplate>
            <asp:Calendar ID="calendar" runat="server" SelectionMode="DayWeekMonth" SelectedDayStyle-BackColor="Gray" TodayDayStyle-BorderColor="#4B6C9E" OnDayRender="calendar_DayRender" OnSelectionChanged="calendar_SelectionChanged">
                <SelectedDayStyle BackColor="Gray" BorderColor="#009933" BorderStyle="Solid" BorderWidth="2px" ForeColor="White" />
                <TodayDayStyle BorderColor="#4B6C9E" />
            </asp:Calendar>
            <asp:Label ID="lRecordCount" runat="server" Text="" Font-Bold="true"></asp:Label>
            <asp:Repeater ID="rResults" runat="server">
                <HeaderTemplate>
                    <table border="1" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <p class="lbl">Марка </p>
                            </td>
                            <td>
                                <p class="lbl">Модел</p>
                            </td>
                            <td>
                                <p class="lbl">Рег. Номер</p>
                            </td>
                            <td>
                                <p class="lbl">Собственик</p>
                            </td>
                            <td>
                                <p class="lbl">Стойност на щетата</p>
                            </td>
                            <td>
                                <p class="lbl">Дата на оценка</p>
                            </td>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <a href='Default.aspx?DamageId=<%#Eval("DamageId") %>'>
                                <%#Eval("MakeName") %>
                            </a>
                            <br />
                            <a href='Default.aspx?CarId=<%#Eval("CarId") %>'>Нова щета на този автомобил
                            </a>
                            <br />
                            <a href='Default.aspx?OwnerId=<%#Eval("OwnerId") %>'>Нова щета на този собственик
                            </a>

                        </td>
                        <td>
                            <%#Eval("ModelName") %>
                        </td>
                        <td>
                            <%#Eval("RegNumber") %>
                        </td>
                        <td>
                            <%#Eval("Name") %>
                        </td>
                        <td>
                            <%#Eval("Total") %>
                        </td>
                        <td style="text-align:center">
                            <%#Eval("ExpertiseDate")!=null?DateTime.Parse(Eval("ExpertiseDate").ToString()).ToShortDateString():"" %>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
